<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery.min.js"></script>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div></div>
    <script>
        //操作样式之css方法
        $(function(){
            // $('div').css('width','300px');
        //    console.log( $('div').css('width'));//属性名一定要加引号
            $('div').css({
                width:400,
                height:400,
                backgroundColor:'red',
                fontSize:20
                //如果是复合属性必须使用驼峰命名法
            })
        })
    </script>

</body>
</html>